import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:getx/common/routers/index.dart';
import 'package:getx/common/utils/screen_adapter_util.dart';

import 'index.dart';

class OrderPage extends GetView<OrderController> {
  const OrderPage({super.key});

  // 主视图
  Widget _buildView() {
    return Center(
      child: InkWell(
        child: Text(
          "OrderPage",
          style: TextStyle(fontSize: 16.rpx),
        ),
        onTap: () => Get.toNamed(RouteNames.order + RouteNames.orderDetail),
      ),
    );
  }

  @override
  Widget build(BuildContext context) {
    return GetBuilder<OrderController>(
      init: OrderController(),
      id: "order",
      builder: (_) {
        return Scaffold(
          // appBar: AppBar(title: const Text("order")),
          body: SafeArea(
            child: _buildView(),
          ),
        );
      },
    );
  }
}
